import tkinter.messagebox
from tkinter import * 

win = tkinter.Tk()
win.title('显示图像示例')  #定义窗体标题
win.geometry('200x200')  #定义窗体的大小200x200像素

can = tkinter.Canvas(win, height=200, width=200) #定义画布


filename = PhotoImage(file = "test.gif")
image = can.create_image(150, 10, anchor=NE, image=filename)  # 


can.pack()
win.mainloop()